﻿using Abp.Application.Services;
using Abp.Application.Services.Dto;
using FutureApp.Shop.Dto;
using System;
using System.Threading.Tasks;

namespace FutureApp.Shop
{
    /// <summary>
    /// 商品应用服务
    /// </summary>
    public interface IGoodsAppService : IApplicationService
    {
        /// <summary>
        /// 获取商品列表
        /// </summary>
        /// <param name="input">参数</param>
        /// <returns>返回商品列表</returns>
        PagedResultDto<GoodsItemEntityDto> GetGoodsList(GetGoodsListInput input);

        /// <summary>
        /// 获取商品
        /// </summary>
        /// <param name="id">商品Id</param>
        /// <returns>返回商品</returns>
        Task<GoodsItemEntityDto> GetGoodsById(Guid id);

        /// <summary>
        /// 获取商品
        /// </summary>
        /// <param name="serialNo">商品货号</param>
        /// <returns>返回商品</returns>
        Task<GoodsItemEntityDto> GetGoodsBySerialNo(string serialNo);
        
        /// <summary>
        /// 是否存在商品
        /// </summary>
        /// <param name="id">商品Id</param>
        /// <returns>存在返回<c>true</c>，不存在返回<c>false</c></returns>
        Task<bool> ExistGoods(Guid id);

        /// <summary>
        /// 是否存在商品
        /// </summary>
        /// <param name="serialNo">商品货号</param>
        /// <returns>存在返回<c>true</c>，不存在返回<c>false</c></returns>
        Task<bool> ExistGoods(string serialNo);

        /// <summary>
        /// 创建商品
        /// </summary>
        /// <param name="input">参数</param>
        Task CreateGoods(CreateGoodsInput input);

        /// <summary>
        /// 更新商品信息
        /// </summary>
        /// <param name="input">参数</param>
        Task UpdateGoods(UpdateGoodsInput input);

        /// <summary>
        /// 启用商品
        /// </summary>
        /// <param name="id">商品Id</param>
        Task EnableGoods(Guid id);

        /// <summary>
        /// 禁用商品
        /// </summary>
        /// <param name="id">商品Id</param>
        Task DisableGoods(Guid id);
    }
}
